package com.punai.customer.mapper;

import com.punai.common.core.mapper.CommonMapper;
import com.punai.customer.domain.CusMaterialCuChapter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 材料章节Mapper接口
 *
 * @author zxw_
 * @date 2023-01-30
 */
public interface CusMaterialCuChapterMapper extends CommonMapper<CusMaterialCuChapter>
{
    /**
     * 查询材料章节
     *
     * @param id 材料章节主键
     * @return 材料章节
     */
    public CusMaterialCuChapter selectCusMaterialCuChapterById(String id);

    /**
     * 查询材料章节列表
     *
     * @param cusMaterialCuChapter 材料章节
     * @return 材料章节集合
     */
    public List<CusMaterialCuChapter> selectCusMaterialCuChapterList(CusMaterialCuChapter cusMaterialCuChapter);


    /**
     * 删除材料章节
     *
     * @param id 材料章节主键
     * @return 结果
     */
    public int deleteCusMaterialCuChapterById(String id);

    /**
     * 批量删除材料章节
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCusMaterialCuChapterByIds(String[] ids);

    void copyCusMaterialChapter(@Param("companyId") Long companyId);

    void copyCusMaterialItem(@Param("companyId") Long companyId);

    void copyLinkCusItemSta(@Param("companyId") Long companyId);

    List<CusMaterialCuChapter> selectChildId(@Param("chapterId") String chapterId,@Param("companyId") Long companyId);

    List<String> selectChildIdById(@Param("chapterId") String chapterId,@Param("companyId") Long companyId);

    void deleteByCompanyId(@Param("companyId") Long companyId);
}
